package cn.itsource.pethome.constant;

/**
 * 系统常量
 */
public class Constant {

    /**
     * 入驻审核状态
     */
    public static final Integer DISABLED = -1; //禁用
    public static final Integer NORMAL = 0;    //正常
    public static final Integer AUDIT = 1;     //待审核
    public static final Integer ACTIVITY = 2;  //待激活
    public static final Integer REJECT = 3;    //驳回


    /**
     * 前台后台登录
     */
    public static final String FRONT_LOGIN = "front";
    public static final String ADMIN_LOGIN = "admin";

    //用户登录后，用户对象在Session中的key
    public static final String KEY_OF_LOGINUSER = "loginUser";

    //Redis中存储用户对象的过期时间
    public static final Integer EXPIRETIME_OF_LOGINUSER = 30 * 60;

    /**
     * 微信登录：APPID
     */
    public static final String APPID = "wxd853562a0548a7d0";
    /**
     * 微信登录：SECRET 秘钥
     */
    public static final String SECRET = "4a5d5615f93f24bdba2ba8534642dbb6";

    /**
     * 微信登录：通过code获取AccessToken的接口地址
     */
    public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
    /**
     * 微信：通过access_token和openid获取微信用户个人信息的接口地址
     */
    public static final String WECHAT_USERINFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESSTOKEN&openid=OPENID&lang=zh-CN";
}
